function check()
{
	if(check_usr()&&check_pwd()&&check_same()&&check_qq())
	return true;
	else
	alert("填入信息有错误！");
	return false;
}
function check_usr()
{
	var x;
	x=document.forms["info"]["username"].value;
	var pat=/^[a-zA-Z]\w{5,15}$/;
	if(x.search(pat)==-1)
	{
		document.getElementById("usr").style.display="";
		return false;
	}
	else
	{		
		document.getElementById("usr").style.display="none";
		return true;
	}
}
function check_pwd()
{
	var x;
	x=document.forms["info"]["password"].value;
	var pat=/^\w{6,16}$/;
	//alert (x.search(pat));
	if(x.search(pat)==-1)
	{
		document.getElementById("pwd").style.display="";
		return false;
	}
	else
	{
		document.getElementById("pwd").style.display="none";
		return true;
	}
}
function check_same()
{
	var x=document.forms["info"]["password"].value;
	var y=document.forms["info"]["password_again"].value;
	if(x!=y)
	{
		document.getElementById("not_same").style.display="";
		return false;
	}
	else
	{
		document.getElementById("not_same").style.display="none";
		return true;
	}
}
function check_qq()
{
	var x;
	x=document.forms["info"]["qqnum"].value;
	pat=/[1-9][0-9]{4,}/;
	if(x.search(pat)==-1)
	{
		document.getElementById("qq").style.display="";
		return false;
	}
	else
	{
		document.getElementById("qq").style.display="none";
		return true;
	}
}